/*
 *  AudioSessionSupport.c
 *  OpenALCapture
 *
 *  Created by Eric Wing on 7/8/09.
 *  Copyright 2009 PlayControl Software, LLC. All rights reserved.
 *
 */

#include "AudioSessionSupport.h"
#include <AudioToolbox/AudioToolbox.h>
#include <stdio.h> /* printf */
#include <ctype.h> /* isprint */
#include <arpa/inet.h> /* htonl */

bool InitAudioSession(UInt32 session_category, AudioSessionInterruptionListener interruption_callback, void* user_data)
{
	// setup our audio session
	
	AudioSessionInitialize(NULL, NULL, interruption_callback, user_data);
	AudioSessionSetProperty(kAudioSessionProperty_AudioCategory, sizeof(session_category), &session_category);
	AudioSessionSetActive(true);
	return true;
}
